package ua.org.nuos.sdms.clientgui.server.services;

import ua.org.nuos.configuration.SdmsConfiguration;
import ua.org.nuos.sdms.middle.service.AuthenticationBean;
import ua.org.nuos.sdms.middle.facade.ClientBean;
import ua.org.nuos.sdms.middle.service.RegistrationServiceBean;

import javax.ejb.EJB;
import java.io.Serializable;

/**
 * Created by IntelliJ IDEA.
 * User: dio
 * Date: 16.10.11
 * Time: 18:23
 * To change this template use File | Settings | File Templates.
 */
public class ServiceLocator implements Serializable {

    @EJB(beanName = "SdmsConfiguration")
    protected SdmsConfiguration configuration;

    @EJB(beanName = "RegistrationServiceBean")
    private RegistrationServiceBean registrationBean;

    @EJB(beanName = "AuthenticationBean")
    private AuthenticationBean authenticationBean;

    @EJB(beanName = "ClientBean")
    private ClientBean clientBean;

    private LoginService loginService;

    public ServiceLocator() {
        loginService = new LoginService(this);
    }

    public RegistrationServiceBean getRegistrationBean() {
        return registrationBean;
    }

    public LoginService getLoginService() {
        return loginService;
    }

    public SdmsConfiguration getConfiguration() {
        return configuration;
    }

    public AuthenticationBean getAuthenticationBean() {
        return authenticationBean;
    }

    public ClientBean getClientBean() {
        return clientBean;
    }
}
